Skip to content

DATAREDIS-728 - Fix unnecessary cache configurations map creation in RedisCacheManagerBuilder.withInitialCacheConfiguration #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kezhuw
Copy link
Contributor

@kezhuw kezhuw commented Nov 9, 2017

RedisCacheManagerBuilder.withInitialCacheConfiguration appends new cache configurations by doing:

  1. Create a new map initialized with existing cache configuration.
  2. Put all new cache configurations to that newly created map.
  3. Assign the newly created map to field initialCaches.

While just Map.putAll can accomplish this.

@kezhuw kezhuw changed the title Fix unnecessary cache configurations map creation in RedisCacheManagerBuilder.withInitialCacheConfiguration DATAREDIS-727 - Fix unnecessary cache configurations map creation in RedisCacheManagerBuilder.withInitialCacheConfiguration Nov 9, 2017
@kezhuw kezhuw changed the title DATAREDIS-727 - Fix unnecessary cache configurations map creation in RedisCacheManagerBuilder.withInitialCacheConfiguration DATAREDIS-728 - Fix unnecessary cache configurations map creation in RedisCacheManagerBuilder.withInitialCacheConfiguration Nov 9, 2017
@mp911de
Copy link
Member

mp911de commented Nov 16, 2017

Thanks a lot for your pull request. I'll take it from here.

mp911de pushed a commit that referenced this pull request Nov 16, 2017
…acheManagerBuilder.

We now reuse the initially created map and add or replace initial configurations in place instead of creating each time a new map.

Original pull request: #293.
mp911de added a commit that referenced this pull request Nov 16, 2017
Add tests. Add author tag.

Original pull request: #293.
mp911de pushed a commit that referenced this pull request Nov 16, 2017
…acheManagerBuilder.

We now reuse the initially created map and add or replace initial configurations in place instead of creating each time a new map.

Original pull request: #293.
mp911de added a commit that referenced this pull request Nov 16, 2017
Add tests. Add author tag.

Original pull request: #293.
@mp911de
Copy link
Member

mp911de commented Nov 16, 2017

That's now merged, polished and backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants